import React from 'react'
<<<<<<< HEAD
import { Outlet } from 'react-router-dom'
export default function App() {
  sessionStorage.setItem('userId','66683381833a7da049fc885e')
  return (
    <div className='app'><Outlet/></div>
=======
import { useNavigate } from 'react-router-dom'
import { Outlet } from 'react-router-dom'
import { Tabbar } from '@nutui/nutui-react'
import { Cart, Category, Find, Home, User } from '@nutui/icons-react'
import './App.css'

export default function App() {
  const navigate = useNavigate()
  return (
    <div className='app_box'>
      <Outlet></Outlet>
      <Tabbar
        fixed
        activeColor='green'
        onSwitch={(val) => {
          console.log(val);
          if (val === 0) {
            navigate('/home')
          } else if (val === 1) {
            navigate('/type')
          } else if (val === 2) {
            navigate('/cart')
          } else if (val === 3) {
            navigate('/my')
          }
        }}
      >
        <Tabbar.Item title="首页" icon={<Home width={20} height={20} />} />
        <Tabbar.Item title="分类" icon={<Category width={20} height={20} />} />
        <Tabbar.Item title="购物车" icon={<Cart width={20} height={20} />} />
        <Tabbar.Item title="我的" icon={<User width={20} height={20} />} />
      </Tabbar>
    </div>
>>>>>>> origin/jiayuting
  )
}
